#ifndef __LING_MMPAGE_H__
#define __LING_MMPAGE_H__
#include "list.h"

enum page_type{
    PAGE_TYPE_FREE = 0,
    PAGE_TYPE_USED = 1,
    PAGE_TYPE_RESERVED = 2,
    PAGE_PAGE_TYPE_HOLE = 3,
   
};



  
        /* data */
    struct page
    {   
        
        union
        {
            struct 
            {
                unsigned long private;          //page_order    表示从哪个order出去的page
                struct list_head list;
                unsigned long flag;
                unsigned long _mapcount;        //map到虚拟地址的次数
                unsigned long _refcount;        //引用计数，用于释放物理页
                struct zone_struct *zone;	/* Memory zone we are in. */
            };

            struct {
                struct list_head slab_list;      //slab所在的链表free/partial/full
                struct kmem_cache *slab_cache;  //结构体用其追踪所有
                void *freelist;                 //用于指向页框中空闲对象链表。空闲对象链表包含页框中每个空闲对象的索引。
                void *s_mem;                    //第一个对象的地址
                unsigned int active;
            };
        };
        
        unsigned char real_page[4096];
    };
    

#endif